﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CaiLiao_PanDian.aspx.cs" Inherits="syc.Store.CaiLiao_PanDian" %>
<html>
<body>

<script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop">材料库存盘点表</div>
    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <asp:Button ID="Button_Export" runat="server" Text="导出盘点表" CssClass="button" 
            Font-Size="13px" Font-Bold="false"
            UseSubmitBehavior="False"/>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>

<center>
<h2>材料库存盘点表</h2>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [品名], [规格], [单位], [库存] FROM [材料]">
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#000000" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Both" 
        AllowPaging="True" CssClass="report" Width="800px"  >
        <Columns>
            <asp:BoundField DataField="品名" HeaderText="品名" SortExpression="品名" />
            <asp:BoundField DataField="规格" HeaderText="规格" SortExpression="规格" />
            <asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" />
            <asp:BoundField DataField="库存" HeaderText="库存" SortExpression="库存" />
            <asp:BoundField  HeaderText="实际库存" />
            <asp:BoundField  HeaderText="库存盈亏" />
        </Columns>
    </asp:GridView>
    
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }
</script>



</form>
</body>
</html>
